<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1, user-scalable=no">
  <meta name="description" content="API docs for the AMapWidget constructor from the Class AMapWidget class from the amap_flutter_map library, for the Dart programming language.">
  <title>AMapWidget constructor - AMapWidget class - amap_flutter_map library - Dart API</title>

  
  <link href="https://fonts.googleapis.com/css?family=Source+Code+Pro:500,400i,400,300|Source+Sans+Pro:400,300,700" rel="stylesheet">
  <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
  <link rel="stylesheet" href="../../static-assets/github.css">
  <link rel="stylesheet" href="../../static-assets/styles.css">
  <link rel="icon" href="../../static-assets/favicon.png">

</head>

<body data-base-href="../../"
      data-using-base-href="false">

<div id="overlay-under-drawer"></div>

<header id="title">
  <button id="sidenav-left-toggle" type="button">&nbsp;</button>
  <ol class="breadcrumbs gt-separated dark hidden-xs">
    <li><a href="../../index.html">amap_flutter_map</a></li>
    <li><a href="../../amap_flutter_map/amap_flutter_map-library.html">amap_flutter_map</a></li>
    <li><a href="../../amap_flutter_map/AMapWidget-class.html">AMapWidget</a></li>
    <li class="self-crumb">AMapWidget const constructor</li>
  </ol>
  <div class="self-name">AMapWidget</div>
  <form class="search navbar-right" role="search">
    <input type="text" id="search-box" autocomplete="off" disabled class="form-control typeahead" placeholder="Loading search...">
  </form>
</header>

<main>

  <div id="dartdoc-sidebar-left" class="col-xs-6 col-sm-3 col-md-2 sidebar sidebar-offcanvas-left">
    <header id="header-search-sidebar" class="hidden-l">
      <form class="search-sidebar" role="search">
        <input type="text" id="search-sidebar" autocomplete="off" disabled class="form-control typeahead" placeholder="Loading search...">
      </form>
    </header>
    
    <ol class="breadcrumbs gt-separated dark hidden-l" id="sidebar-nav">
      <li><a href="../../index.html">amap_flutter_map</a></li>
      <li><a href="../../amap_flutter_map/amap_flutter_map-library.html">amap_flutter_map</a></li>
      <li><a href="../../amap_flutter_map/AMapWidget-class.html">AMapWidget</a></li>
      <li class="self-crumb">AMapWidget const constructor</li>
    </ol>
    
    <h5>AMapWidget class</h5>
    <ol>
    
      <li class="section-title"><a href="../../amap_flutter_map/AMapWidget-class.html#constructors">Constructors</a></li>
      <li><a href="../../amap_flutter_map/AMapWidget/AMapWidget.html">AMapWidget</a></li>
    
      <li class="section-title">
        <a href="../../amap_flutter_map/AMapWidget-class.html#instance-properties">Properties</a>
      </li>
      <li><a href="../../amap_flutter_map/AMapWidget/apiKey.html">apiKey</a></li>
      <li><a href="../../amap_flutter_map/AMapWidget/buildingsEnabled.html">buildingsEnabled</a></li>
      <li><a href="../../amap_flutter_map/AMapWidget/compassEnabled.html">compassEnabled</a></li>
      <li><a href="../../amap_flutter_map/AMapWidget/customStyleOptions.html">customStyleOptions</a></li>
      <li><a href="../../amap_flutter_map/AMapWidget/gestureRecognizers.html">gestureRecognizers</a></li>
      <li class="inherited"><a href="https://api.flutter.dev/flutter/widgets/Widget/hashCode.html">hashCode</a></li>
      <li><a href="../../amap_flutter_map/AMapWidget/initialCameraPosition.html">initialCameraPosition</a></li>
      <li class="inherited"><a href="https://api.flutter.dev/flutter/widgets/Widget/key.html">key</a></li>
      <li><a href="../../amap_flutter_map/AMapWidget/labelsEnabled.html">labelsEnabled</a></li>
      <li><a href="../../amap_flutter_map/AMapWidget/limitBounds.html">limitBounds</a></li>
      <li><a href="../../amap_flutter_map/AMapWidget/mapType.html">mapType</a></li>
      <li><a href="../../amap_flutter_map/AMapWidget/markers.html">markers</a></li>
      <li><a href="../../amap_flutter_map/AMapWidget/minMaxZoomPreference.html">minMaxZoomPreference</a></li>
      <li><a href="../../amap_flutter_map/AMapWidget/myLocationStyleOptions.html">myLocationStyleOptions</a></li>
      <li><a href="../../amap_flutter_map/AMapWidget/onCameraMove.html">onCameraMove</a></li>
      <li><a href="../../amap_flutter_map/AMapWidget/onCameraMoveEnd.html">onCameraMoveEnd</a></li>
      <li><a href="../../amap_flutter_map/AMapWidget/onLocationChanged.html">onLocationChanged</a></li>
      <li><a href="../../amap_flutter_map/AMapWidget/onLongPress.html">onLongPress</a></li>
      <li><a href="../../amap_flutter_map/AMapWidget/onMapCreated.html">onMapCreated</a></li>
      <li><a href="../../amap_flutter_map/AMapWidget/onPoiTouched.html">onPoiTouched</a></li>
      <li><a href="../../amap_flutter_map/AMapWidget/onTap.html">onTap</a></li>
      <li><a href="../../amap_flutter_map/AMapWidget/polygons.html">polygons</a></li>
      <li><a href="../../amap_flutter_map/AMapWidget/polylines.html">polylines</a></li>
      <li><a href="../../amap_flutter_map/AMapWidget/rotateGesturesEnabled.html">rotateGesturesEnabled</a></li>
      <li class="inherited"><a href="https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html">runtimeType</a></li>
      <li><a href="../../amap_flutter_map/AMapWidget/scaleEnabled.html">scaleEnabled</a></li>
      <li><a href="../../amap_flutter_map/AMapWidget/scrollGesturesEnabled.html">scrollGesturesEnabled</a></li>
      <li><a href="../../amap_flutter_map/AMapWidget/tiltGesturesEnabled.html">tiltGesturesEnabled</a></li>
      <li><a href="../../amap_flutter_map/AMapWidget/touchPoiEnabled.html">touchPoiEnabled</a></li>
      <li><a href="../../amap_flutter_map/AMapWidget/trafficEnabled.html">trafficEnabled</a></li>
      <li><a href="../../amap_flutter_map/AMapWidget/zoomGesturesEnabled.html">zoomGesturesEnabled</a></li>
    
      <li class="section-title"><a href="../../amap_flutter_map/AMapWidget-class.html#instance-methods">Methods</a></li>
      <li class="inherited"><a href="https://api.flutter.dev/flutter/widgets/StatefulWidget/createElement.html">createElement</a></li>
      <li><a href="../../amap_flutter_map/AMapWidget/createState.html">createState</a></li>
      <li class="inherited"><a href="https://api.flutter.dev/flutter/foundation/DiagnosticableTree/debugDescribeChildren.html">debugDescribeChildren</a></li>
      <li class="inherited"><a href="https://api.flutter.dev/flutter/widgets/Widget/debugFillProperties.html">debugFillProperties</a></li>
      <li class="inherited"><a href="https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html">noSuchMethod</a></li>
      <li class="inherited"><a href="https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html">toDiagnosticsNode</a></li>
      <li class="inherited"><a href="https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html">toString</a></li>
      <li class="inherited"><a href="https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html">toStringDeep</a></li>
      <li class="inherited"><a href="https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html">toStringShallow</a></li>
      <li class="inherited"><a href="https://api.flutter.dev/flutter/widgets/Widget/toStringShort.html">toStringShort</a></li>
    
      <li class="section-title inherited"><a href="../../amap_flutter_map/AMapWidget-class.html#operators">Operators</a></li>
      <li class="inherited"><a href="https://api.flutter.dev/flutter/widgets/Widget/operator_equals.html">operator ==</a></li>
    
    
    
    
    </ol>
  </div><!--/.sidebar-offcanvas-left-->

  <div id="dartdoc-main-content" class="col-xs-12 col-sm-9 col-md-8 main-content">
      <div><h1><span class="kind-constructor">AMapWidget</span> constructor </h1></div>

    <section class="multi-line-signature">
      const
      <span class="name ">AMapWidget</span>(<wbr><ol class="parameter-list"><li><span class="parameter" id="-param-key">{<span class="type-annotation"><a href="https://api.flutter.dev/flutter/foundation/Key-class.html">Key</a></span> <span class="parameter-name">key</span>, </span></li>
<li><span class="parameter" id="-param-apiKey"><span class="type-annotation">AMapApiKey</span> <span class="parameter-name">apiKey</span>, </span></li>
<li><span class="parameter" id="-param-initialCameraPosition"><span class="type-annotation"><a href="../../amap_flutter_map/CameraPosition-class.html">CameraPosition</a></span> <span class="parameter-name">initialCameraPosition</span>: <span class="default-value">const CameraPosition(target: LatLng(39.909187, 116.397451), zoom: 10)</span>, </span></li>
<li><span class="parameter" id="-param-mapType"><span class="type-annotation"><a href="../../amap_flutter_map/MapType-class.html">MapType</a></span> <span class="parameter-name">mapType</span>: <span class="default-value">MapType.normal</span>, </span></li>
<li><span class="parameter" id="-param-buildingsEnabled"><span class="type-annotation"><a href="https://api.flutter.dev/flutter/dart-core/bool-class.html">bool</a></span> <span class="parameter-name">buildingsEnabled</span>: <span class="default-value">true</span>, </span></li>
<li><span class="parameter" id="-param-compassEnabled"><span class="type-annotation"><a href="https://api.flutter.dev/flutter/dart-core/bool-class.html">bool</a></span> <span class="parameter-name">compassEnabled</span>: <span class="default-value">false</span>, </span></li>
<li><span class="parameter" id="-param-labelsEnabled"><span class="type-annotation"><a href="https://api.flutter.dev/flutter/dart-core/bool-class.html">bool</a></span> <span class="parameter-name">labelsEnabled</span>: <span class="default-value">true</span>, </span></li>
<li><span class="parameter" id="-param-limitBounds"><span class="type-annotation">LatLngBounds</span> <span class="parameter-name">limitBounds</span>, </span></li>
<li><span class="parameter" id="-param-minMaxZoomPreference"><span class="type-annotation"><a href="../../amap_flutter_map/MinMaxZoomPreference-class.html">MinMaxZoomPreference</a></span> <span class="parameter-name">minMaxZoomPreference</span>, </span></li>
<li><span class="parameter" id="-param-rotateGesturesEnabled"><span class="type-annotation"><a href="https://api.flutter.dev/flutter/dart-core/bool-class.html">bool</a></span> <span class="parameter-name">rotateGesturesEnabled</span>: <span class="default-value">true</span>, </span></li>
<li><span class="parameter" id="-param-scaleEnabled"><span class="type-annotation"><a href="https://api.flutter.dev/flutter/dart-core/bool-class.html">bool</a></span> <span class="parameter-name">scaleEnabled</span>: <span class="default-value">true</span>, </span></li>
<li><span class="parameter" id="-param-scrollGesturesEnabled"><span class="type-annotation"><a href="https://api.flutter.dev/flutter/dart-core/bool-class.html">bool</a></span> <span class="parameter-name">scrollGesturesEnabled</span>: <span class="default-value">true</span>, </span></li>
<li><span class="parameter" id="-param-tiltGesturesEnabled"><span class="type-annotation"><a href="https://api.flutter.dev/flutter/dart-core/bool-class.html">bool</a></span> <span class="parameter-name">tiltGesturesEnabled</span>: <span class="default-value">true</span>, </span></li>
<li><span class="parameter" id="-param-touchPoiEnabled"><span class="type-annotation"><a href="https://api.flutter.dev/flutter/dart-core/bool-class.html">bool</a></span> <span class="parameter-name">touchPoiEnabled</span>: <span class="default-value">true</span>, </span></li>
<li><span class="parameter" id="-param-trafficEnabled"><span class="type-annotation"><a href="https://api.flutter.dev/flutter/dart-core/bool-class.html">bool</a></span> <span class="parameter-name">trafficEnabled</span>: <span class="default-value">false</span>, </span></li>
<li><span class="parameter" id="-param-zoomGesturesEnabled"><span class="type-annotation"><a href="https://api.flutter.dev/flutter/dart-core/bool-class.html">bool</a></span> <span class="parameter-name">zoomGesturesEnabled</span>: <span class="default-value">true</span>, </span></li>
<li><span class="parameter" id="-param-onMapCreated"><span class="type-annotation"><a href="../../amap_flutter_map/MapCreatedCallback.html">MapCreatedCallback</a></span> <span class="parameter-name">onMapCreated</span>, </span></li>
<li><span class="parameter" id="-param-gestureRecognizers"><span class="type-annotation"><a href="https://api.flutter.dev/flutter/dart-core/Set-class.html">Set</a><span class="signature">&lt;<wbr><span class="type-parameter"><a href="https://api.flutter.dev/flutter/foundation/Factory-class.html">Factory</a><span class="signature">&lt;<wbr><span class="type-parameter"><a href="https://api.flutter.dev/flutter/gestures/OneSequenceGestureRecognizer-class.html">OneSequenceGestureRecognizer</a></span>&gt;</span></span>&gt;</span></span> <span class="parameter-name">gestureRecognizers</span>, </span></li>
<li><span class="parameter" id="-param-customStyleOptions"><span class="type-annotation"><a href="../../amap_flutter_map/CustomStyleOptions-class.html">CustomStyleOptions</a></span> <span class="parameter-name">customStyleOptions</span>, </span></li>
<li><span class="parameter" id="-param-myLocationStyleOptions"><span class="type-annotation"><a href="../../amap_flutter_map/MyLocationStyleOptions-class.html">MyLocationStyleOptions</a></span> <span class="parameter-name">myLocationStyleOptions</span>, </span></li>
<li><span class="parameter" id="-param-onCameraMove"><span class="type-annotation">ArgumentCallback<span class="signature">&lt;<wbr><span class="type-parameter"><a href="../../amap_flutter_map/CameraPosition-class.html">CameraPosition</a></span>&gt;</span></span> <span class="parameter-name">onCameraMove</span>, </span></li>
<li><span class="parameter" id="-param-onCameraMoveEnd"><span class="type-annotation">ArgumentCallback<span class="signature">&lt;<wbr><span class="type-parameter"><a href="../../amap_flutter_map/CameraPosition-class.html">CameraPosition</a></span>&gt;</span></span> <span class="parameter-name">onCameraMoveEnd</span>, </span></li>
<li><span class="parameter" id="-param-onLocationChanged"><span class="type-annotation">ArgumentCallback<span class="signature">&lt;<wbr><span class="type-parameter">AMapLocation</span>&gt;</span></span> <span class="parameter-name">onLocationChanged</span>, </span></li>
<li><span class="parameter" id="-param-onTap"><span class="type-annotation">ArgumentCallback<span class="signature">&lt;<wbr><span class="type-parameter">LatLng</span>&gt;</span></span> <span class="parameter-name">onTap</span>, </span></li>
<li><span class="parameter" id="-param-onLongPress"><span class="type-annotation">ArgumentCallback<span class="signature">&lt;<wbr><span class="type-parameter">LatLng</span>&gt;</span></span> <span class="parameter-name">onLongPress</span>, </span></li>
<li><span class="parameter" id="-param-onPoiTouched"><span class="type-annotation">ArgumentCallback<span class="signature">&lt;<wbr><span class="type-parameter">AMapPoi</span>&gt;</span></span> <span class="parameter-name">onPoiTouched</span>, </span></li>
<li><span class="parameter" id="-param-markers"><span class="type-annotation"><a href="https://api.flutter.dev/flutter/dart-core/Set-class.html">Set</a><span class="signature">&lt;<wbr><span class="type-parameter"><a href="../../amap_flutter_map/Marker-class.html">Marker</a></span>&gt;</span></span> <span class="parameter-name">markers</span>, </span></li>
<li><span class="parameter" id="-param-polylines"><span class="type-annotation"><a href="https://api.flutter.dev/flutter/dart-core/Set-class.html">Set</a><span class="signature">&lt;<wbr><span class="type-parameter"><a href="../../amap_flutter_map/Polyline-class.html">Polyline</a></span>&gt;</span></span> <span class="parameter-name">polylines</span>, </span></li>
<li><span class="parameter" id="-param-polygons"><span class="type-annotation"><a href="https://api.flutter.dev/flutter/dart-core/Set-class.html">Set</a><span class="signature">&lt;<wbr><span class="type-parameter"><a href="../../amap_flutter_map/Polygon-class.html">Polygon</a></span>&gt;</span></span> <span class="parameter-name">polygons</span>}</span></li>
</ol>)
    </section>

    <section class="desc markdown">
      <p>创建一个展示高德地图的widget
<a href="https://api.flutter.dev/flutter/dart-core/AssertionError-class.html">AssertionError</a> will be thrown if <code>initialCameraPosition</code> is null;</p>
    </section>
    
    <section class="summary source-code" id="source">
      <h2><span>Implementation</span></h2>
      <pre class="language-dart"><code class="language-dart">const AMapWidget({
  Key key,
  this.apiKey,
  this.initialCameraPosition =
      const CameraPosition(target: LatLng(39.909187, 116.397451), zoom: 10),
  this.mapType = MapType.normal,
  this.buildingsEnabled = true,
  this.compassEnabled = false,
  this.labelsEnabled = true,
  this.limitBounds,
  this.minMaxZoomPreference,
  this.rotateGesturesEnabled = true,
  this.scaleEnabled = true,
  this.scrollGesturesEnabled = true,
  this.tiltGesturesEnabled = true,
  this.touchPoiEnabled = true,
  this.trafficEnabled = false,
  this.zoomGesturesEnabled = true,
  this.onMapCreated,
  this.gestureRecognizers,
  this.customStyleOptions,
  this.myLocationStyleOptions,
  this.onCameraMove,
  this.onCameraMoveEnd,
  this.onLocationChanged,
  this.onTap,
  this.onLongPress,
  this.onPoiTouched,
  this.markers,
  this.polylines,
  this.polygons,
})  : assert(initialCameraPosition != null),
      super(key: key);</code></pre>
    </section>

  </div> <!-- /.main-content -->

  <div id="dartdoc-sidebar-right" class="col-xs-6 col-sm-6 col-md-2 sidebar sidebar-offcanvas-right">
  </div><!--/.sidebar-offcanvas-->

</main>

<footer>
  <span class="no-break">
    amap_flutter_map
      1.1.0
  </span>

</footer>

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="../../static-assets/typeahead.bundle.min.js"></script>
<script src="../../static-assets/highlight.pack.js"></script>
<script src="../../static-assets/URI.js"></script>
<script src="../../static-assets/script.js"></script>


</body>

</html>
